package com.glsc.ngateway.platform.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.util.Map;

/**
 * 流程预览信息
 *
 * @author xuchang
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class FlowTaskParamPreVo {

    private String processDefinitionKey;

    private Map<String, String> userGroup;

    private Map<String, String> conditionalVar;

    public static FlowTaskParamPreVo build(@NotBlank String processKey, Map<String, String> userGroup, Map<String, String> conditionalVar) {
        FlowTaskParamPreVo view = new FlowTaskParamPreVo();
        view.setProcessDefinitionKey(processKey);
        view.setConditionalVar(conditionalVar);
        view.setUserGroup(userGroup);
        return view;
    }
}
